package cn.xo68.boot.auth.client.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 客户端认证配置
 * @author wuxie
 * @version 2019-11-26
 */
@Data
@Configuration
@ConfigurationProperties("wuxie.auth.provider")
public class AuthProviderProperties {

    private boolean enabled;

    /**
     * 认证根据路径
     */
    private String rootUri;
    /**
     * 认证接口地址
     */
    private String authorizationUri="/oauth/authorize";
    /**
     * 令牌申请接口地址
     */
    private String tokenUri="/oauth/token";
    /**
     * 用户信息获取地址
     */
    private String userInfoUri="/client/userinfo";
    /**
     * 用户资源获取地址
     */
    private String resourceUri="/client/resource";
    /**
     * 用户登录地址
     */
    private String logoutUri="/client/logout";


    private int userInfoCacheTimeout=60*3;


    private int resourceCacheTimeout=60*3;

    /**
     * 没有权限的地址
     */
    private String unauthorizedUrl="/error/unauthorized.html";
}
